package com.xb.controller;

import com.xb.service.ITollTakeDrugService;
import com.xb.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpSession;

/**
 * entityController
 * /api/tollTakeDrug
 */
@RestController
@RequestMapping("/api/tollTakeDrug")
public class TollTakeDrugController {
    @Autowired
    private ITollTakeDrugService tollTakeDrugService;


    @PostMapping("/getMedicalRecord")
    public Result getMedicalRecord(String prescriptionNum) {
        return tollTakeDrugService.getMedicalRecord(prescriptionNum);
    }

    @PostMapping("/saveTakingDrugInfo")
    public Result saveTakingDrugInfo(String prescriptionNum, HttpSession session) {
        return tollTakeDrugService.saveTakingDrugInfo(prescriptionNum, session);
    }

}
